alien_0 = {'color': 'green', 'points': 5}
print(alien_0['color'])
print(alien_0['points'])
print(str(alien_0['points']) + "a")
print(alien_0)
alien_0['x_postition'] = 0
alien_0['x_postition'] = 25
print(alien_0)

alien_1 = {}
alien_1['color'] = 'red'
alien_1['points'] = 5
print(alien_1)

del alien_1['color']
print(alien_1)

user_0 = {
    'username': 'efermi',
    'fist': 'enrico',
    'last': 'fermi',
}

for k, v in user_0.items():
    print("\nKey: " + k)
    print("value: " + v)

print(user_0.items())

favorite_languages = {
    'jen': 'python',
    'sarah': 'c',
    'edward': 'ruby',
    'phil': 'python',
}

print(favorite_languages.keys())
print('-------')
for k in favorite_languages.keys():
    print(k)
print('-------')    
for n in favorite_languages:
    print(n)

friends = ['phil', 'sarah']
for name in favorite_languages.keys():
    print(name.title())
    if (name in friends):
        print(" Hi " + name.title() + "I see your favourite languages " + favorite_languages[name] + "!.")

for name in sorted(favorite_languages.keys()):
    print(name.title())

for language in favorite_languages.keys():
    print(language.title())

alien_0 = {'color': 'green', 'points': 5}
alien_1 = {'color': 'yellow', 'points': 10}
alien_2 = {'color': 'red', 'points': 15}

aliens = [alien_0, alien_1, alien_2]
for alien in aliens:
    print(alien)

aliens = []
for alien_number in range(30):
    new_alien = {'color': 'green', 'points': 5}
    aliens.append(new_alien)

print(aliens)
print(str(len(aliens)))

for alien in aliens[0:3]:
    if alien['color'] == 'green':
        alien['color'] = 'yellow'
        alien['speed'] = 'medium'
        alien['points'] = 10

    elif alien['color'] == 'green':
        alien['color'] = 'red'
        alien['speed'] = 'fast' 
        alien['points'] = 15   


for alien in aliens[0:5]:
    print(alien)